import Vue from 'vue'
import Router from 'vue-router'
import { routers } from './router'

Vue.use(Router)

// 路由器配置
const RouterConfig = {
  routes: routers
}

// 注册路由
export const router = new Router(RouterConfig)

router.afterEach(_ => {
  window.scrollTo(0, 0)
})
